<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
    <script type="text/javascript">
        /*
            json介绍
              1.定义格式 1：{key:value,key:value,...}
              2.定义格式 2：
                  [{key:value,key:value,...},{key:value,key:value,...}，{key:value,key:value,...},...]
              3.定义格式 3：
                  {key:value,key:[key:value,key1:value1,...],key:value,...}
         */
        let person = {
            "username": "柳岩",
            "age": 18,
            "address": "湖南"
        }
        console.log(person.address);//湖南
        let arr=[{"username":"柳岩","age":18,"address":"湖南"},{"username":"杨幂","age":20,"address":"北京"}];
        console.log(arr[1].age);

        let person2={"username":"锁哥",students:[{"name":"孙磊","age":25},{"name":"陈浪","age":24}],"number":"itcast001"};
        console.log(person2.students[1].name);//陈浪





    </script>
</body>

</html>